bitkeeper revision 1.582 (3faf962fX5syo8fIhzw2drHCKGZJ0w)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Mon, 10 Nov 2003 13:44:15 +0000 (13:44 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Mon, 10 Nov 2003 13:44:15 +0000 (13:44 +0000)
os.h:
  Fix mini-os for pre 2.96 gcc.

extras/mini-os/h/os.h

index c63ae6cdd5b470c190876b4cc378c5ea57ed30b7..9be205e00922e1ca8b101bab703944c3ca0198e1 100644 (file)
@@ -9,6 +9,15 @@
 
 #define NULL 0
 
+/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
+   a mechanism by which the user can annotate likely branch directions and
+   expect the blocks to be reordered appropriately.  Define __builtin_expect
+   to nothing for earlier compilers.  */
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
 /*
  * These are the segment descriptors provided for us by the hypervisor.
  * For now, these are hardwired -- guest OSes cannot update the GDT